using System;
using Microsoft.SPOT;

namespace MicroSnake
{
    class Rounds
    {
        public static short NUMBERS_OF_LEVELS = 2;
        public static DifficultyLevels DifficultyLevel { get; set; }

        public static void MakeRound(GameBoard gameBoard, int level, ref short remainedMouse, ref int timerCounter)
        {
            if (DifficultyLevel == DifficultyLevels.Easy) timerCounter = 400;
            if (DifficultyLevel == DifficultyLevels.Normal) timerCounter = 300;
            if (DifficultyLevel == DifficultyLevels.Hard) timerCounter = 200;

            switch (level)
            {
                case 1:
                    remainedMouse = 10;

                    for (int i = 5; i <= 15; i++)
                    {
                        gameBoard.Items[10][i] = GameItems.Wall;
                        gameBoard.Items[i][10] = GameItems.Wall;
                    }
                    break;

                case 2:
                    remainedMouse = 10;

                    for (int i = 0; i < 8; i++)
                    {
                        gameBoard.Items[0][i] = GameItems.Wall;
                        gameBoard.Items[19][i] = GameItems.Wall;
                        gameBoard.Items[i][0] = GameItems.Wall;
                        gameBoard.Items[i][10] = GameItems.Wall;
                    }

                    for (int i = 12; i < 20; i++)
                    {
                        gameBoard.Items[0][i] = GameItems.Wall;
                        gameBoard.Items[19][i] = GameItems.Wall;
                        gameBoard.Items[i][0] = GameItems.Wall;
                        gameBoard.Items[i][10] = GameItems.Wall;
                    }

                    for (int i = 4; i < 16; i++)
                    {
                        gameBoard.Items[i][10] = GameItems.Wall;
                        gameBoard.Items[i][11] = GameItems.Wall;
                        gameBoard.Items[i][4] = GameItems.Wall;
                        gameBoard.Items[i][15] = GameItems.Wall;
                    }

                    break;
            }
        }
    }
}
